import { ACTION_TYPES } from 'utils/constant';
const initialState = {
    loading: false,
    list: []
}


export default function user(state = initialState, action) {
    switch (action.type) {
        case ACTION_TYPES.USER_LIST_REQUEST: 
            return ({
                ...state, 
                          
               
            })
        case ACTION_TYPES.USER_LIST_SUCCESS:
            return ({
                ...state,
                list: [
                    ...state.list,
                    ...action.users
                ]
               
            })
        case ACTION_TYPES.USER_LIST_FAIL:
            return ({
                ...state,
               
            })
        
        default:
            return state;
    }
}